package cn.smileyan.demos.operators;

import org.apache.flink.streaming.api.datastream.DataStreamSource;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;

/**
 * flink 打印 DataStreamSource 中的内容
 * @author smileyan
 */
public class PrintDemo {
    public static void main(String[] args) throws Exception {
        final StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
        DataStreamSource<Integer> dataStream = env.fromElements(1, 2, 3, 4, 5, 6);
        dataStream.print();
        env.execute();
    }
}
